<?php
$key = $form_view_config['key'];
?>
<div class="row_text_field">
	<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td class="left_text_field"><?=$form_view_config['text']?>:</td>
			<?php if($form_view_config['file_type'] == 'image') { ?>
			<td class="right_text_field">
				<input type="file" name="fileAdmincp[<?=$form_view_config['name']?>]" /><div style="clear:both;padding-top:5px;"></div>
				<?php
				 if(isset($result->$key)){ if($result->$key!=''){ ?> 
				<a class="fancyboxClick" href="<?=PATH_URL.$form_view_config['images_dir_path'].$result->$key?>"><img src="<?=PATH_URL.'static/uploads/'.$this->_module.'/image/'.$result->$key?>" width="<?=$form_view_config['width']?>" height="<?=$form_view_config['height']?>"/></a>
				<?php }} ?>
				<?php //if($result->$key){?>
				<input type="checkbox" name="delete_<?=$form_view_config['name']?>" value="detele_<?=$form_view_config['name']?>" /> Delete Image
				<?php //}?>
							
			</td>
				<?php } 
				else if($form_view_config['file_type'] == 'audio') { ?>
				<td class="right_text_field"><input type="file" name="fileAdmincp[<?=$form_view_config['name']?>]" />
					Only support (mp3)<?php if(isset($result->$key)){ if($result->$key!=''){ ?> - 
					<p id="audioplayer_<?=$form_view_config['name']?>"></p> 
					<script type="text/javascript">  
					AudioPlayer.embed("audioplayer_<?=$form_view_config['name']?>", {soundFile: "<?=PATH_URL.'static/uploads/'.$this->_module.'/audio/'.$result->$key?>"});  
					</script><?php }} ?>

				</td>
				<?php }
				else if($form_view_config['file_type'] == 'video'){
				?>
				<td class="right_text_field">
					<input type="file" name="fileAdmincp[<?=$form_view_config['name']?>]" />Only support FLV and MP4 <?php if(isset($result->$key)){ if($result->$key!=''){ ?> - 
					
					<!--Video review-->
					<a href="#videoplayer_container_<?=$form_view_config['name']?>" rel="videoplayer<?=$form_view_config['name']?>" class="video-fancy" >Play Video</a>
					<div style="display: none">
						<div id="videoplayer_container_<?=$form_view_config['name']?>">
							<p id="videoplayer_<?=$form_view_config['name']?>">Please install the Flash Plugin</p>

							<script type="text/javascript">
							  var flashvars = { file:'<?=PATH_URL.'static/uploads/'.$this->_module.'/video/'.$result->$key?>',autostart:'false' };
							  var params = { allowfullscreen:'true', allowscriptaccess:'always' };
							  var attributes = { id:'videoplayer<?=$form_view_config['name']?>', name:'videoplayer<?=$form_view_config['name']?>' };

							  swfobject.embedSWF(root+'static/js/admin/player.swf','videoplayer_<?=$form_view_config['name']?>','640','480','9.0.115','false',
								flashvars, params, attributes);
							</script>
						</div>
					</div>
				<?php } }  ?>
				</td>
				<?php } ?>
		</tr>
	</table>
</div>

